<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Test socket.io</title>

    </head>
    <body>
        <ul id="socket">
        </ul>
    </body>
    <script src="//cdn.bootcss.com/socket.io/1.6.0/socket.io.js"></script>
    <script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
    <script>
        var socket = io('127.0.0.1:3000');
        socket.on('test-channel',function (data) {
            $('#socket').append('<li>'+ data.name +'</li>')
        })
    </script>
</html>
